package com.lanju.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="lj_house_equipment")
public class HouseEquipment implements Serializable{

	 private static final long serialVersionUID = -1600219019264329257L;
	 
	 private String  equipment_id;
	 
	private String equipment_name;
	 
	 private Integer equipment_num;
	 
	 private House house;
	 
	 
	 @Id
	 @Column(name="equipment_id",unique=true,nullable=false)
	 public String getEquipment_id() {
		return equipment_id;
	}

	public void setEquipment_id(String equipment_id) {
		this.equipment_id = equipment_id;
	}
	
	 @Column(name="equipment_name")
	public String getEquipment_name() {
		return equipment_name;
	}

	public void setEquipment_name(String equipment_name) {
		this.equipment_name = equipment_name;
	}
	 @Column(name="equipment_num")
	public Integer getEquipment_num() {
		return equipment_num;
	}

	public void setEquipment_num(Integer equipment_num) {
		this.equipment_num = equipment_num;
	}
	@JsonIgnore
	 @ManyToOne(fetch=FetchType.LAZY)
	 @JoinColumn(name="houseId", nullable=false)
	public House getHouse() {
		return house;
	}

	public void setHouse(House house) {
		this.house = house;
	}
	 
	 
}
